package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.FlowFormSystemNameModify;
import com.glsc.ngateway.common.api.flowable.dto.task.formData.system.domainDto.FlowFormSystemNameModifyDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: zhengyr
 * @Desc: domin到dto转换
 */

/**
 * @Mapper自动生成接口实现类，完成domin与dto转换，componentModel=spring：规定实现类的组件类型，自动在实现类上加@Components注解，是否可以通过@Autowired引入实现类？
 */
@Mapper(componentModel = "spring")
public interface FlowFormSystemNameModifyMapper {

    FlowFormSystemNameModifyMapper INSTANCE = Mappers.getMapper(FlowFormSystemNameModifyMapper.class);

    @Mapping(target = "appendicesFileList", ignore = true)
    FlowFormSystemNameModifyDto domain2dto(FlowFormSystemNameModify domain);

    List<FlowFormSystemNameModifyDto> domain2dto(List<FlowFormSystemNameModify> domain);

    @Mapping(target = "appendicesFileIdList", ignore = true)
    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    FlowFormSystemNameModify dto2domain(FlowFormSystemNameModifyDto dto);

    List<FlowFormSystemNameModify> dto2domain(List<FlowFormSystemNameModifyDto> dto);
}
